/*
 * ExternalSensor.cpp
 *
 *  Created on: Feb 2, 2009
 *      Author: Andrzej Olchawa
 *      mailto: andrzejolchawa@gmail.com
 *      http://www.hardtechnology.org
 *      This is a part of the Armazd project, which is covered by
 *      GNU GPL v2 license.
 */

#include "ExternalSensor.h"

ExternalSensor::ExternalSensor()
{
	sensorMessage = NULL;
	rawMessage = "sensor message";
}

ExternalSensor::~ExternalSensor()
{
	if (rawMessage)
	{
		delete [] rawMessage;
	}

	if (sensorMessage)
	{
		delete sensorMessage;
	}
}

char *ExternalSensor::getRawMessage()
{
	return rawMessage;
}

SensorMessage *ExternalSensor::getSensorMessage()
{
	return sensorMessage;
}

extern "C" ExternalSensor* create()
{
    return new ExternalSensor();
}

extern "C" void destroy(ExternalSensor* p)
{
    delete p;
}
